package com.itheima.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 敏感词库实体
 *
 * @author 51585
 * @TableName sensitive_vocabulary
 */
@TableName(value = "sensitive_vocabulary")
@Data
public class SensitiveVocabulary implements Serializable {
    private static final long serialVersionUID = 3411054499739063272L;
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 敏感词汇
     */
    @TableField(value = "word")
    private String word;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @TableField(value = "deleted_at")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableLogic
    private LocalDateTime deletedAt;
}